﻿namespace ACCOUNTING
{
    using ACCOUNTING.LVY.Business;
    using ACCOUNTING.My;
    using ACCOUNTING.My.Resources;
    using C1.Win.C1FlexGrid;
    using C1.Win.C1FlexGrid.Util.BaseControls;
    using Microsoft.VisualBasic;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Diagnostics;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    [DesignerGenerated]
    public class Frm_DinhNghiaKetChuyenChiPhiTraTruoc : Form
    {
        private static List<WeakReference> __ENCList = new List<WeakReference>();
        [AccessedThroughProperty("AdvTaiKhoan")]
        private ADVAccount _AdvTaiKhoan;
        [AccessedThroughProperty("CboDonVi")]
        private ComboBox _CboDonVi;
        [AccessedThroughProperty("CboHienThi")]
        private ComboBox _CboHienThi;
        [AccessedThroughProperty("CmdAdd")]
        private ToolStripButton _CmdAdd;
        [AccessedThroughProperty("CmdDel")]
        private ToolStripButton _CmdDel;
        [AccessedThroughProperty("CmdExit")]
        private ToolStripButton _CmdExit;
        [AccessedThroughProperty("CmdHelp")]
        private ToolStripButton _CmdHelp;
        [AccessedThroughProperty("CmdRefresh")]
        private ToolStripButton _CmdRefresh;
        [AccessedThroughProperty("cmdTKChiPhiTraTruoc")]
        private ToolStripButton _cmdTKChiPhiTraTruoc;
        [AccessedThroughProperty("Label1")]
        private Label _Label1;
        [AccessedThroughProperty("Label13")]
        private Label _Label13;
        [AccessedThroughProperty("Label2")]
        private Label _Label2;
        [AccessedThroughProperty("Label3")]
        private Label _Label3;
        [AccessedThroughProperty("Label4")]
        private Label _Label4;
        [AccessedThroughProperty("Label5")]
        private Label _Label5;
        [AccessedThroughProperty("Panel1")]
        private Panel _Panel1;
        [AccessedThroughProperty("Panel2")]
        private Panel _Panel2;
        [AccessedThroughProperty("Panel3")]
        private Panel _Panel3;
        [AccessedThroughProperty("Panel4")]
        private Panel _Panel4;
        [AccessedThroughProperty("ToolStrip1")]
        private ToolStrip _ToolStrip1;
        [AccessedThroughProperty("ToolStripButton2")]
        private ToolStripSeparator _ToolStripButton2;
        [AccessedThroughProperty("ToolStripLabel1")]
        private ToolStripLabel _ToolStripLabel1;
        [AccessedThroughProperty("ToolStripSeparator1")]
        private ToolStripSeparator _ToolStripSeparator1;
        [AccessedThroughProperty("ToolStripSeparator2")]
        private ToolStripSeparator _ToolStripSeparator2;
        [AccessedThroughProperty("ToolStripSeparator3")]
        private ToolStripSeparator _ToolStripSeparator3;
        [AccessedThroughProperty("TxtDenNgay")]
        private DateTimePicker _TxtDenNgay;
        [AccessedThroughProperty("TxtTuNgay")]
        private DateTimePicker _TxtTuNgay;
        [AccessedThroughProperty("VSlist")]
        private C1.Win.C1FlexGrid.C1FlexGrid _VSlist;
        private IContainer components;
        private bool mAllowAdd;
        private bool mAllowDel;
        private bool mAllowEdit;
        private bool mAllowView;
        private GLDinhNghiaPhanBo objCPTT;

        public Frm_DinhNghiaKetChuyenChiPhiTraTruoc()
        {
            base.Load += new EventHandler(this.Frm_DinhNghiaKetChuyenChiPhiTraTruoc_Load);
            List<WeakReference> list = __ENCList;
            lock (list)
            {
                __ENCList.Add(new WeakReference(this));
            }
            this.objCPTT = new GLDinhNghiaPhanBo();
            this.InitializeComponent();
        }

        private void CboHienThi_SelectedIndexChanged(object sender, EventArgs e)
        {
            if ((this.CboHienThi.SelectedIndex == 2) | (this.CboHienThi.SelectedIndex == 1))
            {
                this.CmdDel.Enabled = false;
            }
            else
            {
                this.CmdDel.Enabled = true;
            }
        }

        private void CmdAdd_Click(object sender, EventArgs e)
        {
            if ((this.VSlist.Rows.Count != 1) && (this.VSlist.Row > 0))
            {
                if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[this.VSlist.Row, 0]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
                {
                    MyProject.Forms.Frm_ChiPhiTraTruoc.cFrmKhoa = Conversions.ToString(this.VSlist[this.VSlist.Row, 0]);
                    MyProject.Forms.Frm_ChiPhiTraTruoc.ShowDialog();
                }
                else
                {
                    MyProject.Forms.Frm_ChiPhiTraTruoc.cFrmKhoa = "";
                    MyProject.Forms.Frm_ChiPhiTraTruoc.TxtSoChungTu.Tag = RuntimeHelpers.GetObjectValue(this.VSlist[this.VSlist.Row, 1]);
                    MyProject.Forms.Frm_ChiPhiTraTruoc.TxtSoChungTu.Text = Conversions.ToString(this.VSlist[this.VSlist.Row, 5]);
                    MyProject.Forms.Frm_ChiPhiTraTruoc.TxtSoPhatSinh.Value = RuntimeHelpers.GetObjectValue(this.VSlist[this.VSlist.Row, 6]);
                    MyProject.Forms.Frm_ChiPhiTraTruoc.TxtNgayChungTu.Tag = RuntimeHelpers.GetObjectValue(this.VSlist[this.VSlist.Row, 4]);
                    MyProject.Forms.Frm_ChiPhiTraTruoc.TxtDienGiai.Text = Conversions.ToString(this.VSlist[this.VSlist.Row, 8]);
                    MyProject.Forms.Frm_ChiPhiTraTruoc.AdvBoPhanCo.Value = Conversions.ToString(this.VSlist[this.VSlist.Row, 9]);
                    MyProject.Forms.Frm_ChiPhiTraTruoc.advSanPhamCo.Value = Conversions.ToString(this.VSlist[this.VSlist.Row, 10]);
                    MyProject.Forms.Frm_ChiPhiTraTruoc.advHopDongCo.Value = Conversions.ToString(this.VSlist[this.VSlist.Row, 11]);
                    MyProject.Forms.Frm_ChiPhiTraTruoc.AdvTaiKhoanCo.Value = Conversions.ToString(this.VSlist[this.VSlist.Row, 2]);
                    MyProject.Forms.Frm_ChiPhiTraTruoc.txtDaPhanBo.Value = 0;
                    MyProject.Forms.Frm_ChiPhiTraTruoc.txtConLai.Value = RuntimeHelpers.GetObjectValue(this.VSlist[this.VSlist.Row, 6]);
                    MyProject.Forms.Frm_ChiPhiTraTruoc.ShowDialog();
                }
            }
        }

        private void CmdDel_Click(object sender, EventArgs e)
        {
            if ((this.VSlist.Rows.Count != 1) && (this.VSlist.Row > 0))
            {
                string pKhoa = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[this.VSlist.Row, 0]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                if (pKhoa.Trim() != "")
                {
                    this.objCPTT.Load(pKhoa);
                    if (this.objCPTT.DaPhanBoChiPhi(pKhoa))
                    {
                        if (LVYModule.ConfirmDelete(modGeneral.Tranlated("Bạn thật sự muốn ngưng ph\x00e2n bổ chứng từ n\x00e0y?", "")))
                        {
                            this.objCPTT.Ngung(pKhoa);
                        }
                    }
                    else if (LVYModule.ConfirmDelete(""))
                    {
                        this.objCPTT.DelData(pKhoa);
                    }
                }
            }
        }

        private void CmdExit_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        private void CmdRefresh_Click(object sender, EventArgs e)
        {
            this.LoadData();
        }

        private void cmdTKChiPhiTraTruoc_Click(object sender, EventArgs e)
        {
            MyProject.Forms.Frm_TaiKhoanChiPhiTraTruoc.ShowDialog();
        }

        [DebuggerNonUserCode]
        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void Frm_DinhNghiaKetChuyenChiPhiTraTruoc_Load(object sender, EventArgs e)
        {
            LVYModule.GetUserRight(ref this.mAllowView, ref this.mAllowDel, ref this.mAllowEdit, ref this.mAllowAdd, Conversions.ToString(this.Tag), modGeneral.H_USERNAME);
            if (!this.mAllowView)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn kh\x00f4ng c\x00f3 quyền xem, li\x00ean hệ với người quản trị để biết th\x00eam chi tiết.", ""));
                this.Dispose();
            }
            else
            {
                BuildComboModule.BuildCombo(this.CboDonVi, modGeneral.ListDanhMuc.DonVi, true, "", "");
                this.CboDonVi.SelectedValue = modGeneral.H_CLIENT;
                this.CboDonVi.Enabled = false;
                this.CboHienThi.Items.Clear();
                this.CboHienThi.Items.Add(modGeneral.Tranlated("Đang theo d\x00f5i", ""));
                this.CboHienThi.Items.Add(modGeneral.Tranlated("Đ\x00e3 ho\x00e0n tất ph\x00e2n bổ", ""));
                this.CboHienThi.Items.Add(modGeneral.Tranlated("Đ\x00e3 hủy", ""));
                this.CboHienThi.Items.Add(modGeneral.Tranlated("Chưa định nghĩa", ""));
                this.CboHienThi.SelectedIndex = 0;
                this.TxtTuNgay.Text = "01/" + LVYModule.sRight("00" + Conversions.ToString(DateAndTime.Month(DateAndTime.Today)), 2) + "/" + Conversions.ToString(DateAndTime.Year(DateAndTime.Today));
                this.TxtDenNgay.Text = Strings.Format(DateAndTime.Today, "dd/MM/yyyy");
                this.LoadData();
            }
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(Frm_DinhNghiaKetChuyenChiPhiTraTruoc));
            this.Panel1 = new Panel();
            this.Label5 = new Label();
            this.CboHienThi = new ComboBox();
            this.Label2 = new Label();
            this.AdvTaiKhoan = new ADVAccount();
            this.Label1 = new Label();
            this.TxtDenNgay = new DateTimePicker();
            this.Label13 = new Label();
            this.TxtTuNgay = new DateTimePicker();
            this.VSlist = new C1.Win.C1FlexGrid.C1FlexGrid();
            this.CboDonVi = new ComboBox();
            this.ToolStrip1 = new ToolStrip();
            this.CmdAdd = new ToolStripButton();
            this.ToolStripSeparator2 = new ToolStripSeparator();
            this.CmdDel = new ToolStripButton();
            this.ToolStripSeparator3 = new ToolStripSeparator();
            this.CmdExit = new ToolStripButton();
            this.CmdHelp = new ToolStripButton();
            this.CmdRefresh = new ToolStripButton();
            this.ToolStripSeparator1 = new ToolStripSeparator();
            this.cmdTKChiPhiTraTruoc = new ToolStripButton();
            this.ToolStripButton2 = new ToolStripSeparator();
            this.ToolStripLabel1 = new ToolStripLabel();
            this.Panel2 = new Panel();
            this.Label4 = new Label();
            this.Panel4 = new Panel();
            this.Label3 = new Label();
            this.Panel3 = new Panel();
            this.Panel1.SuspendLayout();
            this.VSlist.BeginInit();
            this.ToolStrip1.SuspendLayout();
            this.Panel2.SuspendLayout();
            this.SuspendLayout();
            this.Panel1.BackgroundImage = ACCOUNTING.My.Resources.Resources.bgleft;
            this.Panel1.Controls.Add(this.Label5);
            this.Panel1.Controls.Add(this.CboHienThi);
            this.Panel1.Controls.Add(this.Label2);
            this.Panel1.Controls.Add(this.AdvTaiKhoan);
            this.Panel1.Controls.Add(this.Label1);
            this.Panel1.Controls.Add(this.TxtDenNgay);
            this.Panel1.Controls.Add(this.Label13);
            this.Panel1.Controls.Add(this.TxtTuNgay);
            this.Panel1.Dock = DockStyle.Top;
            Point point = new Point(0, 0x19);
            this.Panel1.Location = point;
            this.Panel1.Name = "Panel1";
            Size size = new Size(0x32e, 0x2d);
            this.Panel1.Size = size;
            this.Panel1.TabIndex = 0;
            this.Label5.AutoSize = true;
            this.Label5.BackColor = Color.Transparent;
            point = new Point(0x1d3, 6);
            this.Label5.Location = point;
            this.Label5.Name = "Label5";
            size = new Size(0x2b, 13);
            this.Label5.Size = size;
            this.Label5.TabIndex = 0x4a;
            this.Label5.Text = "Hiển thị";
            this.CboHienThi.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboHienThi.FormattingEnabled = true;
            point = new Point(470, 0x16);
            this.CboHienThi.Location = point;
            this.CboHienThi.Name = "CboHienThi";
            size = new Size(0xd5, 0x15);
            this.CboHienThi.Size = size;
            this.CboHienThi.TabIndex = 0x49;
            this.Label2.AutoSize = true;
            this.Label2.BackColor = Color.Transparent;
            point = new Point(0xc1, 6);
            this.Label2.Location = point;
            this.Label2.Name = "Label2";
            size = new Size(0x43, 13);
            this.Label2.Size = size;
            this.Label2.TabIndex = 0x47;
            this.Label2.Text = "Số t\x00e0i khoản";
            this.AdvTaiKhoan.Conditions = "";
            this.AdvTaiKhoan.DefaultValue = "";
            this.AdvTaiKhoan.FieldNameFilter = "Left(SoTaiKhoan,3)";
            this.AdvTaiKhoan.KeyFilter = "111";
            point = new Point(0xc4, 0x16);
            this.AdvTaiKhoan.Location = point;
            Padding padding = new Padding(0);
            this.AdvTaiKhoan.Margin = padding;
            this.AdvTaiKhoan.Name = "AdvTaiKhoan";
            this.AdvTaiKhoan.OnlyDigit = false;
            this.AdvTaiKhoan.ReadOnly = false;
            size = new Size(0x109, 20);
            this.AdvTaiKhoan.Size = size;
            this.AdvTaiKhoan.TabIndex = 70;
            this.AdvTaiKhoan.UpperText = true;
            this.AdvTaiKhoan.Value = "";
            this.AdvTaiKhoan.WithCode = 80;
            this.Label1.AutoSize = true;
            this.Label1.BackColor = Color.Transparent;
            point = new Point(0x62, 6);
            this.Label1.Location = point;
            this.Label1.Name = "Label1";
            size = new Size(0x35, 13);
            this.Label1.Size = size;
            this.Label1.TabIndex = 0x45;
            this.Label1.Text = "Đến ng\x00e0y";
            this.TxtDenNgay.Format = DateTimePickerFormat.Custom;
            point = new Point(0x65, 0x16);
            this.TxtDenNgay.Location = point;
            this.TxtDenNgay.Name = "TxtDenNgay";
            size = new Size(0x55, 20);
            this.TxtDenNgay.Size = size;
            this.TxtDenNgay.TabIndex = 0x44;
            this.Label13.AutoSize = true;
            this.Label13.BackColor = Color.Transparent;
            point = new Point(4, 6);
            this.Label13.Location = point;
            this.Label13.Name = "Label13";
            size = new Size(0x2e, 13);
            this.Label13.Size = size;
            this.Label13.TabIndex = 0x43;
            this.Label13.Text = "Từ ng\x00e0y";
            this.TxtTuNgay.Format = DateTimePickerFormat.Custom;
            point = new Point(7, 0x16);
            this.TxtTuNgay.Location = point;
            this.TxtTuNgay.Name = "TxtTuNgay";
            size = new Size(0x53, 20);
            this.TxtTuNgay.Size = size;
            this.TxtTuNgay.TabIndex = 0x42;
            this.VSlist.AllowEditing = false;
            this.VSlist.BorderStyle = C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.Light3D;
            this.VSlist.ColumnInfo = manager.GetString("VSlist.ColumnInfo");
            this.VSlist.Dock = DockStyle.Fill;
            this.VSlist.ExtendLastCol = true;
            this.VSlist.FocusRect = FocusRectEnum.None;
            this.VSlist.KeyActionEnter = KeyActionEnum.MoveAcross;
            point = new Point(0, 70);
            this.VSlist.Location = point;
            this.VSlist.Name = "VSlist";
            this.VSlist.Rows.Count = 1;
            this.VSlist.Rows.DefaultSize = 0x11;
            size = new Size(0x32e, 0x1ac);
            this.VSlist.Size = size;
            this.VSlist.StyleInfo = manager.GetString("VSlist.StyleInfo");
            this.VSlist.TabIndex = 0x19;
            this.VSlist.VisualStyle = VisualStyle.Office2007Blue;
            this.CboDonVi.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboDonVi.FormattingEnabled = true;
            point = new Point(0x198, 2);
            this.CboDonVi.Location = point;
            this.CboDonVi.Name = "CboDonVi";
            size = new Size(0xd5, 0x15);
            this.CboDonVi.Size = size;
            this.CboDonVi.TabIndex = 0x48;
            this.ToolStrip1.BackgroundImage = ACCOUNTING.My.Resources.Resources.bgbluenoborder;
            this.ToolStrip1.Items.AddRange(new ToolStripItem[] { this.CmdAdd, this.ToolStripSeparator2, this.CmdDel, this.ToolStripSeparator3, this.CmdExit, this.CmdHelp, this.CmdRefresh, this.ToolStripSeparator1, this.cmdTKChiPhiTraTruoc, this.ToolStripButton2, this.ToolStripLabel1 });
            point = new Point(0, 0);
            this.ToolStrip1.Location = point;
            this.ToolStrip1.Name = "ToolStrip1";
            size = new Size(0x32e, 0x19);
            this.ToolStrip1.Size = size;
            this.ToolStrip1.TabIndex = 0x16;
            this.ToolStrip1.Text = "ToolStrip1";
            this.CmdAdd.Image = (Image) manager.GetObject("CmdAdd.Image");
            this.CmdAdd.ImageTransparentColor = Color.White;
            this.CmdAdd.Name = "CmdAdd";
            size = new Size(0x55, 0x16);
            this.CmdAdd.Size = size;
            this.CmdAdd.Text = "Định &nghĩa";
            this.ToolStripSeparator2.Name = "ToolStripSeparator2";
            size = new Size(6, 0x19);
            this.ToolStripSeparator2.Size = size;
            this.CmdDel.Image = (Image) manager.GetObject("CmdDel.Image");
            this.CmdDel.ImageTransparentColor = Color.White;
            this.CmdDel.Name = "CmdDel";
            size = new Size(0x31, 0x16);
            this.CmdDel.Size = size;
            this.CmdDel.Text = "&Huỷ";
            this.ToolStripSeparator3.Name = "ToolStripSeparator3";
            size = new Size(6, 0x19);
            this.ToolStripSeparator3.Size = size;
            this.CmdExit.Alignment = ToolStripItemAlignment.Right;
            this.CmdExit.Image = (Image) manager.GetObject("CmdExit.Image");
            this.CmdExit.ImageTransparentColor = Color.White;
            this.CmdExit.Name = "CmdExit";
            size = new Size(0x3a, 0x16);
            this.CmdExit.Size = size;
            this.CmdExit.Text = "Th&o\x00e1t";
            this.CmdHelp.Alignment = ToolStripItemAlignment.Right;
            this.CmdHelp.Image = (Image) manager.GetObject("CmdHelp.Image");
            this.CmdHelp.ImageTransparentColor = Color.Magenta;
            this.CmdHelp.Name = "CmdHelp";
            size = new Size(0x34, 0x16);
            this.CmdHelp.Size = size;
            this.CmdHelp.Text = "&Help";
            this.CmdRefresh.Image = (Image) manager.GetObject("CmdRefresh.Image");
            this.CmdRefresh.ImageTransparentColor = Color.White;
            this.CmdRefresh.Name = "CmdRefresh";
            size = new Size(0x42, 0x16);
            this.CmdRefresh.Size = size;
            this.CmdRefresh.Text = "Refresh";
            this.CmdRefresh.ToolTipText = "F5 Load lại dữ liệu";
            this.ToolStripSeparator1.Name = "ToolStripSeparator1";
            size = new Size(6, 0x19);
            this.ToolStripSeparator1.Size = size;
            this.cmdTKChiPhiTraTruoc.Image = (Image) manager.GetObject("cmdTKChiPhiTraTruoc.Image");
            this.cmdTKChiPhiTraTruoc.ImageTransparentColor = Color.White;
            this.cmdTKChiPhiTraTruoc.Name = "cmdTKChiPhiTraTruoc";
            size = new Size(130, 0x16);
            this.cmdTKChiPhiTraTruoc.Size = size;
            this.cmdTKChiPhiTraTruoc.Text = "TK Chi ph\x00ed trả trước";
            this.ToolStripButton2.Name = "ToolStripButton2";
            size = new Size(6, 0x19);
            this.ToolStripButton2.Size = size;
            this.ToolStripLabel1.Name = "ToolStripLabel1";
            size = new Size(0x29, 0x16);
            this.ToolStripLabel1.Size = size;
            this.ToolStripLabel1.Text = "Đơn vị";
            this.Panel2.BackgroundImage = ACCOUNTING.My.Resources.Resources.bgleft;
            this.Panel2.Controls.Add(this.Label4);
            this.Panel2.Controls.Add(this.Panel4);
            this.Panel2.Controls.Add(this.Label3);
            this.Panel2.Controls.Add(this.Panel3);
            this.Panel2.Dock = DockStyle.Bottom;
            point = new Point(0, 0x1f2);
            this.Panel2.Location = point;
            this.Panel2.Name = "Panel2";
            size = new Size(0x32e, 0x1f);
            this.Panel2.Size = size;
            this.Panel2.TabIndex = 0x49;
            this.Label4.AutoSize = true;
            this.Label4.BackColor = Color.Transparent;
            point = new Point(0xbd, 9);
            this.Label4.Location = point;
            this.Label4.Name = "Label4";
            size = new Size(130, 13);
            this.Label4.Size = size;
            this.Label4.TabIndex = 0x4a;
            this.Label4.Text = "Chưa định nghĩa ph\x00e2n bổ";
            this.Panel4.BackColor = Color.White;
            this.Panel4.BorderStyle = BorderStyle.FixedSingle;
            point = new Point(0xac, 8);
            this.Panel4.Location = point;
            this.Panel4.Name = "Panel4";
            size = new Size(14, 14);
            this.Panel4.Size = size;
            this.Panel4.TabIndex = 0x49;
            this.Label3.AutoSize = true;
            this.Label3.BackColor = Color.Transparent;
            point = new Point(0x18, 9);
            this.Label3.Location = point;
            this.Label3.Name = "Label3";
            size = new Size(0x77, 13);
            this.Label3.Size = size;
            this.Label3.TabIndex = 0x48;
            this.Label3.Text = "Đ\x00e3 định nghĩa ph\x00e2n bổ";
            this.Panel3.BackColor = Color.SandyBrown;
            this.Panel3.BorderStyle = BorderStyle.FixedSingle;
            point = new Point(7, 8);
            this.Panel3.Location = point;
            this.Panel3.Name = "Panel3";
            size = new Size(14, 14);
            this.Panel3.Size = size;
            this.Panel3.TabIndex = 0;
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            size = new Size(0x32e, 0x211);
            this.ClientSize = size;
            this.ControlBox = false;
            this.Controls.Add(this.VSlist);
            this.Controls.Add(this.Panel2);
            this.Controls.Add(this.CboDonVi);
            this.Controls.Add(this.Panel1);
            this.Controls.Add(this.ToolStrip1);
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.KeyPreview = true;
            this.Name = "Frm_DinhNghiaKetChuyenChiPhiTraTruoc";
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Tag = "TH-0009";
            this.Text = "DINH NGHIA PHAN BO CHI PHI TRA TRUOC";
            this.Panel1.ResumeLayout(false);
            this.Panel1.PerformLayout();
            this.VSlist.EndInit();
            this.ToolStrip1.ResumeLayout(false);
            this.ToolStrip1.PerformLayout();
            this.Panel2.ResumeLayout(false);
            this.Panel2.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();
        }

        public void LoadData()
        {
            this.VSlist.Rows.Count = 1;
            DataTable table = this.objCPTT.GetListPhatSinh(LVYModule.Date2Char(this.TxtTuNgay.Text), LVYModule.Date2Char(this.TxtDenNgay.Text), modGeneral.H_CLIENT, this.CboHienThi.SelectedIndex);
            if (table != null)
            {
                CellStyle style = this.VSlist.Styles["Yellow"];
                if (style == null)
                {
                    style = this.VSlist.Styles.Add("Yellow");
                    style.BackColor = this.Panel3.BackColor;
                }
                C1.Win.C1FlexGrid.C1FlexGrid vSlist = this.VSlist;
                int num2 = table.Rows.Count - 1;
                for (int i = 0; i <= num2; i++)
                {
                    vSlist.AddItem("");
                    vSlist[vSlist.Rows.Count - 1, 0] = RuntimeHelpers.GetObjectValue(table.Rows[i]["Khoa"]);
                    vSlist[vSlist.Rows.Count - 1, 1] = RuntimeHelpers.GetObjectValue(table.Rows[i]["KhoaChungTu"]);
                    vSlist[vSlist.Rows.Count - 1, 2] = RuntimeHelpers.GetObjectValue(table.Rows[i]["KhoaTaiKhoanNo"]);
                    vSlist[vSlist.Rows.Count - 1, 3] = RuntimeHelpers.GetObjectValue(table.Rows[i]["SoTaiKhoan"]);
                    vSlist[vSlist.Rows.Count - 1, 4] = RuntimeHelpers.GetObjectValue(table.Rows[i]["Ngay"]);
                    vSlist[vSlist.Rows.Count - 1, 5] = RuntimeHelpers.GetObjectValue(table.Rows[i]["SoChungTu"]);
                    vSlist[vSlist.Rows.Count - 1, 6] = RuntimeHelpers.GetObjectValue(table.Rows[i]["SoPhatSinh"]);
                    vSlist[vSlist.Rows.Count - 1, 7] = RuntimeHelpers.GetObjectValue(table.Rows[i]["DaPhanBo"]);
                    vSlist[vSlist.Rows.Count - 1, 8] = RuntimeHelpers.GetObjectValue(table.Rows[i]["DienGiai"]);
                    vSlist[vSlist.Rows.Count - 1, 9] = RuntimeHelpers.GetObjectValue(table.Rows[i]["KhoaBoPhanNo"]);
                    vSlist[vSlist.Rows.Count - 1, 10] = RuntimeHelpers.GetObjectValue(table.Rows[i]["KhoaSanPhamNo"]);
                    vSlist[vSlist.Rows.Count - 1, 11] = RuntimeHelpers.GetObjectValue(table.Rows[i]["KhoaHopDongNo"]);
                    if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[vSlist.Rows.Count - 1, 0]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
                    {
                        //vSlist.GetCellRange(vSlist.Rows.Count - 1, 0, vSlist.Rows.Count - 1, vSlist.Cols.Count - 1).Style = style;
                    }
                    string str = Conversions.ToString(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[vSlist.Rows.Count - 1, 0]), "", modGeneral.TypeOfValue.Nothing));
                }
                vSlist = null;
            }
        }

        private void VSlist_DoubleClick(object sender, EventArgs e)
        {
            this.CmdAdd_Click(this.CmdAdd, e);
        }

        internal virtual ADVAccount AdvTaiKhoan
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvTaiKhoan;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._AdvTaiKhoan = value;
            }
        }

        internal virtual ComboBox CboDonVi
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboDonVi;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboDonVi = value;
            }
        }

        internal virtual ComboBox CboHienThi
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboHienThi;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CboHienThi_SelectedIndexChanged);
                if (this._CboHienThi != null)
                {
                    this._CboHienThi.SelectedIndexChanged -= handler;
                }
                this._CboHienThi = value;
                if (this._CboHienThi != null)
                {
                    this._CboHienThi.SelectedIndexChanged += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdAdd
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdAdd;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdAdd_Click);
                if (this._CmdAdd != null)
                {
                    this._CmdAdd.Click -= handler;
                }
                this._CmdAdd = value;
                if (this._CmdAdd != null)
                {
                    this._CmdAdd.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdDel
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdDel;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdDel_Click);
                if (this._CmdDel != null)
                {
                    this._CmdDel.Click -= handler;
                }
                this._CmdDel = value;
                if (this._CmdDel != null)
                {
                    this._CmdDel.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdExit
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdExit;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdExit_Click);
                if (this._CmdExit != null)
                {
                    this._CmdExit.Click -= handler;
                }
                this._CmdExit = value;
                if (this._CmdExit != null)
                {
                    this._CmdExit.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdHelp
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdHelp;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CmdHelp = value;
            }
        }

        internal virtual ToolStripButton CmdRefresh
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdRefresh;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdRefresh_Click);
                if (this._CmdRefresh != null)
                {
                    this._CmdRefresh.Click -= handler;
                }
                this._CmdRefresh = value;
                if (this._CmdRefresh != null)
                {
                    this._CmdRefresh.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton cmdTKChiPhiTraTruoc
        {
            [DebuggerNonUserCode]
            get
            {
                return this._cmdTKChiPhiTraTruoc;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.cmdTKChiPhiTraTruoc_Click);
                if (this._cmdTKChiPhiTraTruoc != null)
                {
                    this._cmdTKChiPhiTraTruoc.Click -= handler;
                }
                this._cmdTKChiPhiTraTruoc = value;
                if (this._cmdTKChiPhiTraTruoc != null)
                {
                    this._cmdTKChiPhiTraTruoc.Click += handler;
                }
            }
        }

        internal virtual Label Label1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label1 = value;
            }
        }

        internal virtual Label Label13
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label13;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label13 = value;
            }
        }

        internal virtual Label Label2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label2 = value;
            }
        }

        internal virtual Label Label3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label3 = value;
            }
        }

        internal virtual Label Label4
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label4;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label4 = value;
            }
        }

        internal virtual Label Label5
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label5;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label5 = value;
            }
        }

        internal virtual Panel Panel1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel1 = value;
            }
        }

        internal virtual Panel Panel2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel2 = value;
            }
        }

        internal virtual Panel Panel3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel3 = value;
            }
        }

        internal virtual Panel Panel4
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel4;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel4 = value;
            }
        }

        internal virtual ToolStrip ToolStrip1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStrip1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStrip1 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripButton2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripButton2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripButton2 = value;
            }
        }

        internal virtual ToolStripLabel ToolStripLabel1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripLabel1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripLabel1 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripSeparator1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripSeparator1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripSeparator1 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripSeparator2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripSeparator2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripSeparator2 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripSeparator3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripSeparator3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripSeparator3 = value;
            }
        }

        internal virtual DateTimePicker TxtDenNgay
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtDenNgay;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtDenNgay = value;
            }
        }

        internal virtual DateTimePicker TxtTuNgay
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTuNgay;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTuNgay = value;
            }
        }

        internal virtual C1.Win.C1FlexGrid.C1FlexGrid VSlist
        {
            [DebuggerNonUserCode]
            get
            {
                return this._VSlist;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.VSlist_DoubleClick);
                if (this._VSlist != null)
                {
                    this._VSlist.DoubleClick -= handler;
                }
                this._VSlist = value;
                if (this._VSlist != null)
                {
                    this._VSlist.DoubleClick += handler;
                }
            }
        }
    }
}

